#define  _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
int strcmp(char* p1, char* p2)
{
	int m = 0, n = 0;
	while (*p1 != '\0')
	{
		m = m + *p1;
		p1++;
	}
	while (*p2 != '\0')
	{
		n = n + *p2;
		p2++;
	}
	if (m > n)
		return 1;
	else
		return 0;
}
int main(void)
{
	char a[110], b[110];
	scanf("%s%s", a, b);
	if (strcmp(a, b) > 0)
		printf("%s", a);
	else
		printf("%s", b);


	return 0;
}